<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_元素消失方式</title>
  <style>
    div {
      width: 200px;
      height: 200px;
    }
    .d1 {
      background-color: #000;
    }
    .d1:hover {
      display: none;
    }
    .d2 {
      background-color: #ff0;
    }
    .d2:hover {
      transform: scale(0);
    }
    .d3 {
      background-color: #f00;
    }
    .d3:hover {
      background-color: rgba(0,0,0,0);
    }
    .d4 {
      background-color: #0f0;
    }
    .d4:hover {
      opacity: 0;
    }
  </style>
</head>
<body>
<div class="d1">1</div>
<div class="d2">2</div>
<div class="d3">3</div>
<div class="d4">4</div>

</body>
</html>